package com.dlpu.xihu.service.impl;

import com.dlpu.xihu.mapper.HotelMapper;
import com.dlpu.xihu.model.Hotel;
import com.dlpu.xihu.model.HotelMany;
import com.dlpu.xihu.service.HotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class HotelServiceImpl implements HotelService {
    //实现类实现接口时必须重写接口中的抽象方法
    @Autowired //自动注入
            HotelMapper hm;
    @Override
    public List<Hotel> findAll() {
        return hm.findAll();
    }

    @Override
    public Hotel findById(int id) {
        return hm.findById(id);
    }

    @Override
    public List<HotelMany> findByMany(int id) {
        return hm.findByMany(id);
    }

    @Override
    public List<Hotel> findIntex() {
        return hm.findIntex();
    }

}
